%include "Q:\PU2\Macros\hashmerge.sas";

libname temp "Q:\PU2\temp";
libname input "Q:\External Research Data\AutoPay";
libname output "Q:\PU2\New folder";
libname wr "Q:\PU2\wage_rigidity";
options threads cpucount=actual;
ods graphics / reset=all noborder;

*Compare same worker between Dec 2016 and Dec 2017;
	data merged;
		set wr.stayers_panel_2months(where=(913<=base0<993 and salaried0=1));
		diff_base=base-base0;
		growth_base=100*diff_base/base0;
	run;
	proc sgplot data=merged(where=(913<=base0<953 and -50<=growth_base<=50));
	   histogram growth_base / binwidth=1;
	   title "Distribution of Change in Base Pay from Dec 2016 to Jan 2017";
	   xaxis label="Change in Base Pay (%)";
	run;
	proc sgplot data=merged(where=(953<=base0<993 and -50<=growth_base<=50));
	   histogram growth_base / binwidth=1;
	   title "Distribution of Change in Base Pay from Dec 2016 to Jan 2017";
	   xaxis label="Change in Base Pay (%)";
	run;
